﻿# hello world.py


 # 导包 如果上面的没有就导入下面的
try:
    import cPickle as pickle
except ImportError:
    import pickle

d = dict(url='index.html',title='首页',content='首页')

print(pickle.dumps(d))

f = open(r'20171206.txt','wb')
pickle.dump(d,f)
f.close()

f1 = open(r'20171206.txt', 'rb')
d = pickle.load(f1)
f1.close()
print(d)



